<template>
    <div class="profile">
      <h1>个人信息</h1>
      <el-card>
        <div>
          <p>姓名: {{ user.full_name }}</p>
          <p>学号: {{ user.student_id }}</p>
          <p>邮箱: {{ user.email }}</p>
        </div>
      </el-card>
    </div>
  </template>
  
  <script setup>
  import { ref, onMounted } from 'vue';
  import { useUserStore } from '../stores/user';
  
  const userStore = useUserStore();
  const user = ref({});
  
  onMounted(() => {
    user.value = userStore.user;
  });
  </script>
  
  <style scoped>
  .profile {
    padding: 20px;
  }
  </style>